<!DOCTYPE html>
<html>
<head>
    <title>申诉信息</title>
    <#include "/header.html">
</head>
<body class="bg-white">

<div id="appMain">
</div>

<script type="text/html" id="mainBodyTpl">
    <div class="layui-fluid">
        <form class="layui-form layuimini-form" action="" lay-filter="dataForm">
            <div class="layui-form-item">
                <label class="layui-form-label layui-word-aux">订单编号：</label>
                <div class="layui-form-mid text-lg text-blue">{{d.info.orderTradeNo}}</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-word-aux">店铺名称：</label>
                <div class="layui-form-mid text-lg">{{d.info.storeName}}</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-word-aux">联系方式：</label>
                <div class="layui-form-mid text-lg">
                    <span>{{d.info.mobile}}</span>
                    <div>{{d.info.email}}</div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-word-aux">申诉原因：</label>
                <div class="layui-form-mid text-lg">{{d.info.reason}}</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-word-aux">申诉说明：</label>
                <div class="layui-form-mid text-lg">{{d.info.description}}</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label layui-word-aux">凭证图片：</label>
                <div class="layui-form-mid">
                    <div id="layer-photos-view">
                        {{# layui.each(d.info.images, function(i, src){ }}
                        <img class="album-img" layer-pid="{{i}}" layer-src="{{src}}" src="{{src}}" alt="{{i}}" width="45">
                        {{# }); }}
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <div class="layui-input-block">
                </div>
            </div>
        </form>
    </div>
</script>

<script type="text/javascript">
    layui.use(['form', 'laytpl'], function () {
        var form = layui.form,
            laytpl = layui.laytpl,
            $ = layui.$;

        $(".layui-layer-btn0", parent.document).hide();
        $(".layui-layer-btn.layui-layer-btn-c button.layui-btn", parent.document).remove();

        var _parent = parent;
        if(_parent.formDataId > 0) {
            $.ajax({
                type: "POST",
                url: serverUrl('app/order/appeal-info/' + _parent.formDataId),
                success: function (result) {
                    if (result.code === 0) {
                        laytpl($("#mainBodyTpl").html()).render(result, function(html){
                            $("#appMain").html(html);
                        });
                        layer.photos({
                            photos: '#layer-photos-view'
                            ,anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
                        });
                    }
                }
            });
        }

    });
</script>
</body>
</html>